package com.yanqu.road.entity.log.summergames;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.Date;
import java.util.List;
import java.util.Map;

@FieldTypeAnnotation(tableName = "t_l_summer_games_entry", autoSave = true, dataUpload = true, eventName = "summeet_play", desc = "参赛")
public class LogSummerGamesEntry extends BaseLogEntity {

    @FieldTypeAnnotation(desc = "活动id", dataAttribute = "activityid")
    private int activityId;

    @FieldTypeAnnotation(desc = "玩家id")
    private long userId;

    @FieldTypeAnnotation(desc = "参赛次数", dataAttribute = "summeet_playnum")
    private int times;

    @FieldTypeAnnotation(desc = "参赛结果", dataAttribute = "summeet_result", saveJson = true)
    private List<Map<String, Object>> resultMap;

    @FieldTypeAnnotation(desc = "获得积分", dataAttribute = "summeet_getscore")
    private long getScore;

    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogSummerGamesEntry(int activityId, long userId, int times, List<Map<String, Object>> resultMap, long getScore) {
        this.activityId = activityId;
        this.userId = userId;
        this.times = times;
        this.resultMap = resultMap;
        this.getScore = getScore;
        this.logTime = new Date();
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public int getTimes() {
        return times;
    }

    public void setTimes(int times) {
        this.times = times;
    }

    public List<Map<String, Object>> getResultMap() {
        return resultMap;
    }

    public void setResultMap(List<Map<String, Object>> resultMap) {
        this.resultMap = resultMap;
    }

    public long getGetScore() {
        return getScore;
    }

    public void setGetScore(long getScore) {
        this.getScore = getScore;
    }

    public Date getLogTime() {
        return logTime;
    }

    public void setLogTime(Date logTime) {
        this.logTime = logTime;
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
